package com.ytjj.qmyx.supplychain.mapper;


import com.ytjj.qmyx.supplychain.common.model.response.OrderInteractRecords;
import com.ytjj.qmyx.supplychain.mapper.entity.YxOrderInteractRecords;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 订单问题沟通记录表
 *
 */
public interface YxOrderInteractRecordsMapper extends Mapper<YxOrderInteractRecords> {

    /**
     * 根据问题id和角色查询最新沟通记录
     * @param problemId
     * @param replyRole
     * @return
     */
    List<OrderInteractRecords> selectAllByProblemId(@Param("problemId") Integer problemId, @Param("replyRole") Integer replyRole);

    /**
     * 根据子订单号和角色查询最新沟通记录
     * @param childOrderNo
     * @param replyRole
     * @return
     */
    List<OrderInteractRecords> selectAllByChildOrderNo(@Param("childOrderNo") String childOrderNo, @Param("replyRole") Integer replyRole);

    /**
     * 根据回复人查询订单问题id
     * @param replyUser
     * @return
     */
    List<Integer> selectByReplyUser(@Param("replyUser") String replyUser);

    /**
     * 根据提交人查询订单问题id
     * @param commitUser
     * @return
     */
    List<Integer> selectByCommitUser(@Param("commitUser") String commitUser);

    /**
     * 根据跟单问题分类查询订单问题id
     * @param documentaryProblemType
     * @return
     */
    List<Integer> selectByDocumentaryProblemType(@Param("documentaryProblemType") Integer documentaryProblemType);
}
